<template>
	<view class="main">
		<view class="active_tit">
			<view class="tit">
				简要财务情况
			</view> 
		
		</view>
		<!-- input -->
		<ActiveForm required  ref='totalAssets'>
			<view class="active_label">
				总资产金额（元）：
			</view>
			<view class="active_input">
				<mInput maxlength="16"  v-model="form.totalAssets" />
			</view>
		</ActiveForm>
		
		<ActiveForm  required ref='totalDebt'>
			<view class="active_label">
				总负债金额（元）：
			</view>
			<view class="active_input">
				<mInput maxlength="16"  v-model="form.totalDebt" />
			</view>
		</ActiveForm>
		<ActiveForm required  ref='netAssets'>
			<view class="active_label">
				净资产（元）：
			</view>
			<view class="active_input">
				<mInput maxlength="16" disabled v-model="form.netAssets" />
			</view>
		</ActiveForm>
		<ActiveForm required  ref='debtRate'>
			<view class="active_label">
				资产负债率（%）：
			</view>
			<view class="active_input">
				<mInput :thousand='false' disabled type="number" v-model="form.debtRate" />
			</view>
		</ActiveForm>
		<ActiveForm required  ref='returnYear'>
			<view class="active_label">
				近12个月营业收入（元）：
			</view>
			<view class="active_input">
				<mInput  type="number" v-model="form.returnYear" />
			</view>
		</ActiveForm>
		<ActiveForm required  ref='otherIncomeYear'>
			<view class="active_label">
				近12个月其他收入（元）：
			</view>
			<view class="active_input">
				<mInput  type="number" v-model="form.otherIncomeYear" />
			</view>
		</ActiveForm>
		<ActiveForm required  ref='profitsYear'>
			<view class="active_label">
				近12个月营业利润（元）：
			</view>
			<view class="active_input">
				<mInput  type="number" v-model="form.profitsYear" />
			</view>
		</ActiveForm>
		
		<ActiveForm required  ref='netProfitsYear'>
			<view class="active_label">
				近12个月营业净利润（元）：
			</view>
			<view class="active_input">
				<mInput  type="number" v-model="form.netProfitsYear" />
			</view>
		</ActiveForm>
		<ActiveForm   ref='remark'>
			<view class="active_label">
				备注：：
			</view>
			<view class="active_input">
				<input type="text" v-model="form.remark" />
			</view>
		</ActiveForm>
		
	

	</view>
</template>

<script>
	import chooseImgToBase64 from "@/utils/chooseImgToBase64";
	import SelectPicker from "../../SelectPicker";
	import RegionPicker from "../../RegionPicker";
    import region from '../areaList.js'
	export default {
		name: 'activeForm',
		data() {
			return {
				form: {
					totalAssets:'',
					totalDebt:'',
					netAssets:'',
					debtRate:'',
					returnYear:'',
					otherIncomeYear:'',
					profitsYear:'',
					netProfitsYear:'',
					remark:''
				},
				
				inDisabled:false
			}
		},
		props:{
		
		},
		onShow() {
			
		},
		watch:{
			form:{
				handler:function(res){
					//console.warn('enterpriseInfo组件数据变化',res)
					getApp().globalData.stdOffsurJyFinance =res
					this.form.netAssets = Number(this.form.totalAssets)  - Number(this.form.totalDebt) 
				    this.form.debtRate = (Number(this.form.totalDebt) / Number(this.form.totalAssets)*100).toFixed(2)
				},
				deep:true
			}
		},
		computed:{
		
		},
		components: {
			SelectPicker,
			RegionPicker
		},
		
		mounted() {
			
			//获取返显数据
			setTimeout(()=>{
			  
				//数据反显
				if(JSON.stringify(getApp().globalData.stdOffsurJyFinance) != "{}"){
					this.form = getApp().globalData.stdOffsurJyFinance
				}
				//this.isdisabled = getApp().globalData.entDisabled
			    
			},getApp().globalData.timeout)
		},
		methods:{
			
			
		
		}
	}
</script>

<style lang="scss">
	
	
</style>
